Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Re: How to refer to Java Resources from within the code

In a flash of inspiration, I realised what would be the right way of finding this out. A Google search for 'jar image file' gave me the code: getClass().getResource("imagename.gif"). This didn't work, but led me onto getClass().getClassLoader().getResource("imagename.gif") which also didn't work, but then searching for 'domino java getResource' led me to this blog: http://www.bleedyellow.com/blogs/DominoHerald/entry/use_image_resource_in_java2?lang=en

which is exactly what I was trying to do.

I'm not sure whether I'm annoyed or pleased that I got so close to the answer myself!

Emily.


Feedback response number WEBB8AGJZQ created by ~Mario Rejipyzenader on 10/22/2010

How to refer to Java Resources from... (~Mario Rejipyze... 20.Oct.10)
. . Re: How to refer to Java Resources ... (~Mario Rejipyze... 22.Oct.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS